# coding:utf-8
from PyQt5.QtWidgets import QWidget
from ui.kyticket_main_ui import Ui_kyticket_main
from src import *
from src.ticket_show_all import ticket_show_cls

class kyticket_main(Ui_kyticket_main, QWidget):

    def __init__(self, parent=None):
        super().__init__(parent=parent)
        self.setupUi(self)
        self.add_default.clicked.connect(self.show_default_set)         # 设置默认信息
        self.add_user.clicked.connect(self.show_add_user)               # 添加集成商用户
        self.ticket_show.clicked.connect(self.ticket_show_all)          # 工单查看
        self.add_ticket.clicked.connect(self.show_create_ticket)        # 添加工单
        self.upload_ticket.clicked.connect(self.show_upload_ticket)     # 上传工单
        self.export_weekly.clicked.connect(self.show_export_weekly)     # 生成周报
    
    def show_default_set(self):
        self.add_default = default_set_cls()
        self.add_default.show()
    def show_add_user(self):
        self.add_user = add_user_cls()
        self.add_user.show()
    def ticket_show_all(self):
        self.ticket_show = ticket_show_cls()
        self.ticket_show.show()
    def show_create_ticket(self):
        self.add_ticket = creat_title_cls()
        self.add_ticket.show()
    def show_upload_ticket(self):
        self.upload_ticket = upload_ticket_cls()
        self.upload_ticket.show()
    def show_export_weekly(self):
        self.export_weekly = export_weekly_cls()
        self.export_weekly.show()    
